<?php

namespace App\Controller\Pay;

use App\Base\BaseController4Restful;
use App\Service\PayService;
use Symfony\Component\Routing\Annotation\Route;



class CallBackController extends BaseController4Restful
{
    /**
     * @Route("/pay/cb", name="AppPayCallBackCommonTest")
     */
    public function AppPayCallBackCommonTest(PayService $ps)
    {
        if(!$sn = $this->getParamRequired("sn")){return $this->json_out(0,"code missed");}
        $ps->dealWithPayCallBackInsure($sn);
        return $this->json_out(200,"OK");
    }
}
